import { createContext, useContext } from "react";

// 创建认证上下文
export const AuthContext = createContext({
  isAuthenticated: false,
  user: null,
  login: (user) => {},
  logout: () => {},
});

// 自定义Hook，方便组件使用认证上下文
export const useAuth = () => {
  return useContext(AuthContext);
};